﻿@{
    ViewBag.Title = "StartStat";
    Layout = "~/Views/Shared/_LayoutForBUI.cshtml";
    var listHeader = ViewBag.header as List<string>;
    var listRow = ViewBag.row as List<string[]>;
}
<table class="table table-bordered" style="background-color:white">
    <thead class="datagrid-header">
        <tr>
            <th style="width:70px">序号</th>
            @{
                int index = 1;
                foreach (var header in listHeader)
                {
                    <th>@header</th>
                }
            }
        </tr>
    </thead>
    <tbody>
        @{
        for (int i = 0; i < listRow.Count; i++)
        {
            if (i < listRow.Count - 1)
            {
                <tr>
                    <td>@index</td>
                    @{
                    foreach (var str in listRow[i])
                    {
                        <td>@str</td>
                }
                index++;
                    }
                </tr>
        }
        else
        {
            <tr>
                <td colspan="2">合计</td>
                @{
                for(int j=1; j< listRow[i].Count(); j++)
                {
                    <td>@listRow[i][j]</td>
                    }
                 index++;
                }
            </tr>
    }
}
        }
    </tbody>
</table>

